//汉诺塔游戏：有A,B,C三根柱子，A柱上串着N个大小不同的圆盘，规定小圆盘只能放在大圆盘之上
//请把所有圆盘搬到C柱上，打印最少步骤的攻略，并返回总步骤数量

function move(n, from, temp, to, acc) {
    if(n==0) return acc
    const firstAcc = move(n-1, from, to, temp, acc)
    const newAcc = firstAcc+1
    console.log("step", newAcc,"move id", n, "from", from, "to", to)
    return move(n-1, temp, from, to, newAcc)
}

console.log("总步骤数",move(10,'A','B','C', 0))